---
id: 64b163c20e59cbd4a64940b0
title: Step 3
challengeType: 20
dashedName: step-3
---

# --description--

Create a function to add two numbers together.

# --hints--

Adding 3 and 5 should return 8.

```js
({
  test: () => assert.equal(__userGlobals.get("add")(3,5), 8)
})
```

Test value of `__name__`

```js
({
  test: () => assert(__pyodide.runPython(`__name__ == '__main__'`))
})
```

Test __locals and __pyodide

```js
({
  test: () => assert(__pyodide.runPython(`__locals.get('add')(4,5) == 9`))
})
```

Test cleaner syntax

```js
({
  test: () => assert(runPython(`add(4,5) == 9`))
})
```

Testing getDef

```js
({
  test: () => {
    const add = __helpers.python.getDef(code, "add");
    assert.deepEqual(add, {
        def: "def add(a, b):\n    return a + b\n",
        function_parameters: "a, b",
        function_body: "    return a + b\n",
        function_indentation: 0
    });
  }
})
```

# --seed--

## --seed-contents--

```py
--fcc-editable-region--

--fcc-editable-region--
```

# --solutions--

```py

def add(a, b):
    return a + b

```
